package org.aaa.cloudagent;

public class FileDir {

	FileDir(String filename )
	{
		m_fileName = filename;
		Log.op("Filename :" + filename); 
		SaveFileIndex();
	}
	
	public String GetSaveDir()
	{
		String  filedir = null; 
		String  keyword = m_fileName; //"大非洲";
		String [] docidlist = DocOperater.GetDocidlistByKeyword(keyword);
		
		if(null != docidlist[0])
		{
			filedir=DocOperater.GetDirByDocid(docidlist[0]);
			
		}
		else
		{
			System.out.println("get filedir fail by "+keyword);
		}
		Log.op("return SaveDir :" + filedir); 
		return filedir;
	}
	
	public String GetFileDir()
	{
		//GetFileDirFromHbase(m_fileName);
		return "/";
	}
	
	public int SaveFileIndex()
	{
		
		//SaveIndexintoHbase(m_fileName,GetDir());
		return 0;
	}
	
	public String  m_fileName;
	
	
}
